#define _CRT_SECURE_NO_WARNINGS 1

#include"really_sort.h"

void TestQuickSort()
{
	int a[] = { 5,2,6,3,7,63,9,1,4,17,-4,-9,-1 };
	int sz = sizeof(a) / sizeof(a[0]);
	int left = 0;
	int right = sz - 1;
	printf("QuickSort: ");
	QuickSort(a, left, right);
	PrintSort(a, sz);
}


void TestHoleSort()
{
	int a[] = { 5,2,6,3,7,63,9,1,4,17,-4,-9,-1 };
	int sz = sizeof(a) / sizeof(a[0]);
	int left = 0;
	int right = sz - 1;
	printf("HoleSort: ");
	HoleSort(a, left, right);
	PrintSort(a, sz);
}


void TestABSort()
{
	int a[] = { 5,2,6,3,7,63,9,1,4,17,-4,-9,-1 };
	int sz = sizeof(a) / sizeof(a[0]);
	int left = 0;
	int right = sz - 1;
	printf("ABSort: ");
	ABSort(a, left, right);
	PrintSort(a, sz);
}


void TestIntervalQuick()
{
	int a[] = { 5,2,6,3,7,63,9,1,4,17,-4,-9,-1 };
	int sz = sizeof(a) / sizeof(a[0]);
	int left = 0;
	int right = sz - 1;
	printf("IntervalQuick: ");
	IntervalQuick(a, left, right);
	PrintSort(a, sz);
}

void TestInsertSort()
{
	int a[] = { 5,2,6,3,7,63,9,1,4,17,-4,-9,-1 };
	int sz = sizeof(a) / sizeof(a[0]);
	printf("InsertSort: ");
	InsertSort(a, sz);
	PrintSort(a, sz);
}

void TestQuickSortNoR()
{
	int a[] = { 5,2,6,3,7,63,9,1,4,17,-4,-9,-1 };
	int sz = sizeof(a) / sizeof(a[0]);
	int left = 0;
	int right = sz - 1;
	printf("QuickSortNoR: ");
	QuickSortNoR(a, left, right);
	PrintSort(a, sz);
}

int main()
{
	TestQuickSort();
	TestHoleSort();
	TestABSort();
	TestIntervalQuick();
	TestInsertSort();
	TestQuickSortNoR();
	return 0;
}